import {DIC }from '@/const/dic.js';

export const couponWarehouseOption = {
    card:true,
    border: true,
    index: true,
    indexLabel: '序号',
    selection: true,
    columnBtn:false,
    refreshBtn:false,
    addBtn:false,
    delBtn:false,
    editBtn:false,
    menuWidth:300,
    menuAlign:'center',
    formWidth: '100%',
    align:'center',
    dicData:DIC,
    stripe:true,
    expand:true,
    column: [
    {

                label: "编号",
                prop: "id",
                width: "150",
                fixed: true,
                hide:true,
                addDisplay:false,
                editDisplay:false,

                rules: [{
                    required: true,
                    message: "请输入编号",
                    trigger: "blur"
                }]
            },

        /**优惠券标题*/
        {
        label:"标题",
        prop:"title",
        width:"150",
        fixed: true,
            overHidden:true,
            rules: [{
                   required: true,
                   message: "请输入优惠券标题",
                   trigger: "blur"
               }]
        },
        /**优惠券类型：*/
        {
        label:"类型",
        prop:"type",
        width:"100",
            type:"radio",
            search:true,
            valueDefault: 1,
            slot:true,
        fixed: true,
            dicData: DIC.COUPONTYPE,//优惠券类型的字典名
            rules: [{
                   required: true,
                   message: "请选择优惠券类型",
                   trigger: "blur"
               }]
        },

        /**满减限制*/
        {
        label:"满减限制",
        prop:"minfee",
        width:"150",
       fixed: true,
            hide:true,
            display:true,
            rules: [{
                   required: true,
                   message: "请输入满减限制",
                   trigger: "blur"
               }]
        },
        /**比例*/
        {
        label:"折扣比例",
        prop:"proportion",
        width:"150",
        fixed: true,
            hide:true,
            display:true,
            rules: [{
                   required: true,
                   message: "请输入折扣比例",
                   trigger: "blur"
               }]
        },
        /**直降*/
        {
        label:"减多少",
        prop:"price",
        width:"150",
        fixed: true,
            hide:true,
            display:true,
            rules: [{
                   required: true,
                   message: "请输入减免的价格",
                   trigger: "blur"
               }]
        },
        /**数量*/
        {
        label:"数量",
        prop:"num",
        width:"150",
        fixed: true,
            hide:true,
            rules: [{
                   required: true,
                   message: "请输入数量",
                   trigger: "blur"
               }]
        },
        /**时长*/
        {
        label:"有效时长",
        prop:"validity",
        width:"100",
        fixed: true,
            slot:true,
            rules: [{
                   required: true,
                   message: "请输入有效时长",
                   trigger: "blur"
               }]
        },
        /**有效状态*/
        {
        label:"状态",
        prop:"status",
        width:"150",
            type:"select",
            addDisplay:false,
            editDisplay:false,
         fixed: true,
            slot:true,
            dicData:DIC.STATE,
        },
        /**店铺ID*/
        {
            label:"所属店铺",
            prop:"storeId",
            width:"150",
            fixed: true,
            overHidden:true,
            editDisplay:false,
            type:"select",
            props: {
                label: 'storeName',
                value: 'id'
            },
            dicMethod:'get',
            dicUrl:"/shop/storeApply/allList",
            rules: [{
                required: true,
                message: "请选择店铺",
                trigger: "blur"
            }]
        },
        /**优惠券简介*/
        {
            label:"简介",
            prop:"content",
            width:"150",
            fixed: true,
            type:"textarea",
            hide:true,
            overHidden:true,
            rules: [{
                required: true,
                message: "请输入优惠券简介",
                trigger: "blur"
            }]
        },
    ],

};


